{% extends "base.html" %}

{% block css %}
<link rel = "stylesheet" type = "text/css" href = "/css/register.css" />
{% endblock %}

{% block title %}
        注册 | researchU
{% endblock %}

{% block navigation %}
{% endblock %}

{% block bodycontent %}
	<div class = "signBarContainer">
		<div class = "signBox clearfix">
			<span class = "signBoxContent">
				注册researchU，你可以通过好友关系、群组讨论、问答等服务，更快更好的学习新知识。
			</span>
		</div>
	</div>
        <div id = "registerFormContainer">
                <div id = "registerFormHeader" class = "clearfix">
                        <h2 class = "headerTitle">researchU 注册</h2>
                </div>
				<form action = "/register/" method = "post">
					<div id = "registerForm">
						<div class = "formRow clearfix">
							<label class = "formRowLabel">{{ form.name.label }}:</label> {{ form.name }}
							{% if form.name.errors %}
								<div class = "error">
									{{ form.name.errors.0 }}
								</div>
							{% endif %}
						</div>
						<div class = "formRow clearfix">
							<label class = "formRowLabel">{{ form.email.label }}:</label> {{ form.email }}
							{% if form.email.errors %}
								<div class = "error">
									{{ form.email.errors.0 }}
								</div>
							{% endif %}
						</div>
						<div class = "formRow clearfix">
							<label class = "formRowLabel">{{ form.password.label }}:</label> {{ form.password }}
							{% if form.password.errors %}
								<div class = "error">
									{{ form.password.errors.0 }}
								</div>
							{% endif %}
						</div>
						<div class = "formRow clearfix">
							<label class = "formRowLabel">{{ form.confirm_password.label }}:</label> {{ form.confirm_password }}
							{% if form.confirm_password.errors %}
								<div class = "error">
									{{ form.confirm_password.errors.0 }}
								</div>
							{% endif %}
						</div>
						<div class = "formRow clearfix">
							<label class = "formRowLabel">{{ form.gender.label }}:</label> {{ form.gender }}
							{% if form.gender.errors %}
								<div class = "error">
									{{ form.gender.errors.0 }}
								</div>
							{% endif %}
						</div>
						<div class = "formRow clearfix">
							<label class = "formRowLabel">{{ form.birthday.label }}:</label>{{ form.birthday }}
							{% if form.birthday.errors %}
								<div class = "error">
									{{ form.birthday.errors.0 }}
								</div>
							{% endif %}
						</div>
						<div class = "formRow clearfix">
							<label class = "formRowLabel">{{ form.role_type.label }}:</label>{{ form.role_type }}
							{% if form.role_type.errors %}
								<div class = "error">
									{{ form.role_type.errors.0 }}
								</div>
							{% endif %}
						</div>
						
						
						<div id = "buttons" class = "formRow clearfix">
							<div id = "registerButton">
								<input value = "注册" name = "login" type = "submit" />
							</div>
							<div id = "loginLink">
								or
								<a href = "/login">
									<span class = "buttonText">登录
									</span>
								</a>
							</div>
						</div>
						
					</div>
				</form>
        </div>
{% endblock %}